import {
    BASE_URL
} from '../../config';

import {
    http
} from '../index';

const PLAY_URL = BASE_URL + "/play"
/**
 * 剧情
 * @param {*} data 
 */
export function getPlayletList(data) {
    return http({
        url: PLAY_URL + '/playlet',
        method: 'get',
        data
    })
}
export function getPlayletDetail(id){
    return http({
        url:PLAY_URL+"/playlet/detail",
        method:'get',
        data:{id}
    })
}
/**
 * 热剧
 * @param {*} data 
 */
export function getPlayletPopularList(data) {
    return http({
        url: PLAY_URL + '/playlet/popular',
        method: 'get',
        data
    })
}


export function getFllowPlayletList(data) {
    return http({
        url: PLAY_URL + '/playlet/follow',
        method: 'get',
        data
    })
}
// /playlet/episode
export function getPlayletEpisodeList(data){
    return http({
        url: PLAY_URL + '/playlet/episode',
        method: 'get',
        data
    })
}

export function getPlayletEpisodeDetail(id){
    return http({
        url: PLAY_URL + '/playlet/episode/detail',
        method: 'get',
        data:{id}
    })
}

export function togglePlayLike(data){
    return http({
        url:PLAY_URL+'/playlet/like',
        method:'post',
        data
    })
}

export function playShare(data){
    return http({
        url:PLAY_URL+"/playlet/share",
        method:'post',
        data
    })
}

export function getPlayLogList(data){
    return http({
        url:PLAY_URL+"/log",
        method:'get',
        data
    })
}

export function addPlayLog(data){
    return http({
        url:PLAY_URL+'/log',
        method:'post',
        data
    })
}

export function getPlayletLikeList(data){
    return http({
        url:PLAY_URL+"/playlet/like",
        method:'get',
        data
    })
}